<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<link rel="stylesheet"  href="${host_url}/css/app/common.css">
<link rel="stylesheet"  href="${host_url}/css/app/coupon_details.css">
<link rel="stylesheet"  href="${host_url}/css/app/dropload.css">
<title>${ticket_name}交易明细</title>
<script src="${host_url}/js/app/jquery.min.js"></script>
<script src="${host_url}/js/app/common.js"></script>
<script src="${host_url}/js/app/dropload.min.js"></script>
<script type="text/javascript">
  document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/50 + 'px';
</script> 
<script type="text/javascript">
var os="${os}";
<c:if test="${os=='ios'|| os=='android'}">
function fn_goConnPage(id){
	  var ticketslogone_url = $("#ticketslogone_url").val();
		 window.webkit.messageHandlers.ios_open_page.postMessage('WKViewController:::url->'+ticketslogone_url+'?logticket_id='+id+':::webTitle->交易明细:::isRefresh->YES');
}  

function fn_goConnPage1(order_id,order_state,order_payType,order_orderTyp) {
	window.webkit.messageHandlers.ios_open_page.postMessage('NewOrderDetailViewController:::orderId->'+order_id+':::state->'+order_state+':::payType->'+order_payType+':::orderType->'+order_orderTyp);
}
</c:if>
</script>
</head>
<body>
<input type="hidden"  id="ticketslogone_url" value="${ticketslogone_url }">

    <c:if test="${oneLogTicket.bill_type == 1}">
    <p class="clearfix title-2">
       <span class="leftArea">出账数量</span>
        <span class="rightArea">${oneLogTicket.num}</span>
    </p>
    </c:if>
    <c:if test="${oneLogTicket.bill_type == 2}">
    <p class="clearfix title-2">
       <span class="leftArea">入账数量</span>
       <span class="rightArea color">${oneLogTicket.num}</span>
    </p>
    </c:if>         
    <ul class="content6">
        <li class="clearfix">
            <p class="leftArea">类<span>站位</span>型</p>
            <p class="rightArea">
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.type == 2}">${oneLogTicket.type_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.type == 3}">${oneLogTicket.type_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.type == 1}">${oneLogTicket.type_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.type == 5}">${oneLogTicket.type_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.type == 7}">${oneLogTicket.type_name}</c:if>
            </p> 
        </li>
        <li class="clearfix">
            <p class="leftArea">状<span>站位</span>态</p>
            <p class="rightArea">
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.state == 1 and oneLogTicket.type == 3}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.state == 2 and oneLogTicket.type == 3}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.state == 3 and oneLogTicket.type == 3}">${oneLogTicket.state_name}(相关${ticket_name}已退回)</c:if>
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.state == 2 and oneLogTicket.type == 2}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.state == 3 and oneLogTicket.type == 2}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.state == 2 and oneLogTicket.type == 1}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.state == 2 and oneLogTicket.type == 5}">${oneLogTicket.state_name}</c:if>
	            <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.state == 2 and oneLogTicket.type == 7}">${oneLogTicket.state_name}</c:if>
            </p>
        </li>
        <li class="clearfix">
            <p class="leftArea">创建时间</p>
            <p class="rightArea">${oneLogTicket.create_time}</p>
        </li>
        <li class="clearfix">
            <p class="leftArea">交易单号</p>
            <p class="rightArea">${oneLogTicket.no}</p>
        </li>
         <c:if test="${oneLogTicket.bill_type == 1 and  oneLogTicket.type == 3}">
	        <li class="clearfix">
	            <p class="leftArea">对方账号</p>
	            <p class="rightArea new-style">${oneLogTicket.buy_member_nick_name}</p>
	        </li>
        </c:if>
        <c:if test="${oneLogTicket.type == 3}">
        <li class="clearfix">
            <p class="leftArea">摘<span>站位</span>要</p>
            <p class="rightArea">售出${oneLogTicket.num}${ticket_name}</p>  
        </li>
        </c:if>
        <c:if test="${oneLogTicket.type == 1 }">
        <li class="clearfix">
            <p class="leftArea">摘<span>站位</span>要</p>
            <p class="rightArea">充值<fmt:formatNumber value="${oneLogTicket.rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}${oneLogTicket.num}</p>  
        </li>
        </c:if>
        <c:if test="${oneLogTicket.type != 3 and oneLogTicket.type != 1 }">
	        <li class="clearfix">
	            <p class="leftArea">摘<span>站位</span>要</p>
	            <p class="rightArea">${oneLogTicket.remark}</p>  
	        </li>
        </c:if>
         <c:if test="${oneLogTicket.bill_type == 1 and (oneLogTicket.state == 1 or oneLogTicket.state == 2 or oneLogTicket.state == 3) and oneLogTicket.type != 2}">
	        <li class="clearfix">
	            <p class="leftArea bor-l">售出${ticket_name}</p>
	            <p class="rightArea">${oneLogTicket.num}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">售出${ticket_name}类型</p>
	            <p class="rightArea"><fmt:formatNumber value="${oneLogTicket.rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">买方购入${ticket_name}类型</p>
	            <p class="rightArea"><fmt:formatNumber value="${oneLogTicket.buy_rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">总收益</p>
	            <p class="rightArea">${oneLogTicket.earn}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">--本金</p>
	            <p class="rightArea">${oneLogTicket.capital_cash}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">--利润</p>
	            <p class="rightArea"><fmt:formatNumber value="${oneLogTicket.profit_cash-oneLogTicket.buy_cash}" pattern="#0.00" maxFractionDigits="2"/></p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">--${shopping_money_name}</p>
	            <p class="rightArea">${oneLogTicket.buy_cash}</p>
	        </li>	          	              	        
	     </c:if>
	     <c:if test="${oneLogTicket.bill_type == 1 and oneLogTicket.type == 3 and memberInfo.special_yn=='Y' and memberInfo.member_id !='758' }"> 
	        <li class="clearfix">
	            <p class="leftArea bor-l">本金返还</p>
	            <p class="rightArea">${oneLogTicket.capital_cash}</p>
	        </li>	
	      </c:if>
	     <c:if test="${oneLogTicket.bill_type == 2 and oneLogTicket.type == 1 and oneLogTicket.state ==2}">
	        <li class="clearfix">
	            <p class="leftArea bor-l">充值${ticket_name}</p>
	            <p class="rightArea">${oneLogTicket.num}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">充值换券类型</p>
	            <p class="rightArea"><fmt:formatNumber value="${oneLogTicket.rate*10}" pattern="#0.0" maxFractionDigits="1"/>折${ticket_name}</p>
	        </li>
	        <li class="clearfix">
	            <p class="leftArea bor-l">支付方式</p>
	            <p class="rightArea">
					<c:if test="${oneLogTicket.pay_type == 1}">账户余额</c:if>
					<c:if test="${oneLogTicket.pay_type == 2}">支付宝</c:if>
					<c:if test="${oneLogTicket.pay_type == 3}">微信支付</c:if>
	            </p>
	        </li>	          	              	        
	     </c:if>
	     <c:set var="string_re" value="${oneLogTicket.remark}"/>	     
	     <c:if test="${(oneLogTicket.type == 3 and oneLogTicket.state == 3 and oneLogTicket.bill_type==1)or (oneLogTicket.type == 5 and oneLogTicket.state == 2 and fn:indexOf(string_re,'好友取消订单')>-1 )}">
	     	 <li class="clearfix">
				<p class="leftArea bor-l">关联交易</p>
			 <c:if test="${'ios'==os}">
	            <p class="rightArea col-" <%-- onclick="fn_goConnPage(${oneLogTicket.page_conn_id})" --%>>${oneLogTicket.conn_no}</p>
	       	 </c:if>
	         <c:if test="${'wechat'==os ||'web'==os}">
		    	<p class="rightArea col-" <%-- id='{"name":"weOpenDetailPage", "params": {"logticket_id":${oneLogTicket.page_conn_id }}}' --%> >${oneLogTicket.conn_no}</p>
		     </c:if>
		     <c:if test="${'android'==os}">
		    	<p class="rightArea col-" <%-- onclick="android.startUrl('交易明细','${ticketslogone_url}','logticket_id->${oneLogTicket.page_conn_id}')" --%>>${oneLogTicket.conn_no}</p>
		     </c:if>
			 </li>
	     </c:if>
	     <c:if test="${(oneLogTicket.type == 2 and oneLogTicket.state == 2 and oneLogTicket.conn_no == null) or (oneLogTicket.type == 5 and oneLogTicket.state == 2 and fn:indexOf(string_re,'订单已被取消')>-1)}">
	     	 <li class="clearfix">
				<p class="leftArea bor-l">关联交易</p>
				
			 <c:if test="${'ios'==os}">
		        <p class="rightArea col-" <%-- onclick="fn_goConnPage1('${oneLogTicket.order_id}','${oneLogTicket.order_state}','${oneLogTicket.order_payType}','${oneLogTicket.order_orderTyp}')" --%>>订单号：${oneLogTicket.order_no}</p>
	         </c:if>
	         <c:if test="${'wechat'==os ||'web'==os}">
		    	<p class="rightArea col-" <%-- id='{"name":"weOpenOrderPage", "params": {"orderId":${oneLogTicket.order_id }}}' --%>>订单号：${oneLogTicket.order_no}</p>
		     </c:if>
		     <c:if test="${'android'==os}">
		    	<p class="rightArea col-" <%-- onclick="android.openPage('com.uniplaza.fenx.mmine.order.activity.MineOrderDetailActivity:::order_id->${oneLogTicket.order_id}')" --%>>订单号：${oneLogTicket.order_no}</p>
		     </c:if>
			 </li>
	     </c:if>  	       	        
    </ul>
</body>
</html>